<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册页面</title>
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
    </script>
</head>
<body>
<div>

    用户名：<input id = "userName"> <br>
    密码：<input type="password" id ="password"> <br>
    确认密码：<input type="password" id="rePassword"> <br>
    <button onclick="regist()">提交按钮</button>

</div>
</body>
<script>
    function regist() {
        var userName = $("#userName").val();
        var password = $("#password").val();
        var rePassword = $("#rePassword").val();
        $.ajax({
            url: "http://localhost:8080/_war_exploded/register",
            data:{
                'userName':userName,
                'password':password,
                'rePassword':rePassword
            },
            success:function (data) {
                alert(data);
            }
        })
    }
</script>
</html>